﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace demo_mapwingis
{
    public partial class FrmMain : Form
    {
        public FrmMain()
        {
            InitializeComponent();
        }

        private void FrmMain_Load(object sender, EventArgs e)
        {
            MapWinGIS.Shapefile map = new MapWinGIS.Shapefile();
            map.Open(@"C:\Program Files\MapWindow\Sample Projects\Nhom 11\Xa polygon.shp");
            mapMain1.AddLayer(map, true);
        }

        private void btnZoomIn_Click(object sender, EventArgs e)
        {
            mapMain1.CursorMode = MapWinGIS.tkCursorMode.cmZoomIn;
        }

        private void btnZoomOut_Click(object sender, EventArgs e)
        {
            mapMain1.CursorMode = MapWinGIS.tkCursorMode.cmZoomOut;
        }

        private void btnPan_Click(object sender, EventArgs e)
        {
            mapMain1.CursorMode = MapWinGIS.tkCursorMode.cmPan;
        }

        private void btnFullExtents_Click(object sender, EventArgs e)
        {
            mapMain1.ZoomToMaxExtents();
        }
    }
}
